How does this nested ternary operator work using javascript

visit shbcf.ru